1. Field of the Invention
The present invention relates to a digital camera that executes AF (autofocus) controlled by adopting a contrast method so as to achieve a faster focus match when photographing a person.
2. Description of Related Art
In the contrast AF control, image signals are obtained by capturing an image of a subject with an image sensor such as a CCD, extracting a component in a predetermined spatial frequency band in the signals contained within a predetermined AF area and a focal point evaluation value is calculated by integrating the absolute values. The focal point evaluation value indicates a quantity corresponding to the contrast in the focal point detection area, and the value increases as the contrast level rises. Since the contrast of the image becomes higher as the focus lens assumes a position closer to the focus match position, the lens position at which the focal point evaluation value peaks (hereafter referred to as the peak position) is determined, the peak position is judged to be the focus match position and the focus lens is driven to this focus match position.
When detecting the peak position (AF search) in the contrast method, the so-called hill-climbing control is executed. The hill-climbing control is executed by calculating the focal point evaluation value over a predetermined sampling pitch while driving the focus lens along the optical axis. The direction along which the lens is to be driven to move is determined by comparing the current focal point evaluation value with the preceding evaluation value and data are continuously sampled along the direction in which the evaluation value increases until the peak position (the top of the hill) is detected (see, for instance, Japanese Laid Open Patent Publication No. 2003-315665). Methods alternative to the hill-climbing control include the full range scanning method whereby the focus lens is driven from the infinity side to the close-up side or vice versa, the focal point evaluation value is calculated and stored each time the focus lens has moved over a distance matching a predetermined sampling pitch, and the plurality of focal point evaluation values having been stored are evaluated to determine the peak position upon completing the scan (see, for instance, Japanese Laid Open Patent Publication No. 2003-307669).
There are cameras adopting the contrast method described above, which achieve an improvement in the focus matching accuracy when photographing a person by detecting skin color in the image and selecting an AF area based upon the detection results (see, for instance, Japanese Laid Open Patent Publication No. 2004-037733). There are also digital cameras that detect the face of a person, i.e., the subject in an image, detect the person's eyes based upon the information corresponding to the detected face and execute AF control so as to achieve focus on the detected eyes (see, for instance, Japanese Laid Open Patent Publication No. 2001-215403).
The face of a person in an image may be extracted by extracting a face candidate area that fits a face shape and determining a face area within the extracted area, instead of through the skin color detection (see, for instance, Japanese Laid Open Patent Publication No. H8-063597). As a further alternative, templates each representing one of a plurality of face shapes may be prepared in advance, a correlation between a template and an image may be calculated and a face may be extracted based upon the correlational value having been calculated. Japanese Laid Open Patent Publication No. H9-251534 and Japanese Laid Open Patent Publication No. H10-232934 also disclose technologies related to face recognition and eye detection.